<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/vehiclePath.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('vehiclePath_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/vehiclePath.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="edgeSol_8h_source.html">edgeSol.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for vehiclePath.h:</div>
<div class="dyncontent">
<div class="center"><img src="vehiclePath_8h__incl.png" border="0" usemap="#includes_2vehiclePath_8h" alt=""/></div>
<map name="includes_2vehiclePath_8h" id="includes_2vehiclePath_8h">
<area shape="rect" id="node5" href="edgeSol_8h.html" title="edgeSol.h" alt="" coords="84,83,164,112"/><area shape="rect" id="node9" href="edgeID_8h.html" title="edgeID.h" alt="" coords="87,160,161,189"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="vehiclePath_8h__dep__incl.png" border="0" usemap="#includes_2vehiclePath_8hdep" alt=""/></div>
<map name="includes_2vehiclePath_8hdep" id="includes_2vehiclePath_8hdep">
<area shape="rect" id="node3" href="vehicleState_8h.html" title="includes/vehicleState.h" alt="" coords="411,83,568,112"/><area shape="rect" id="node5" href="add_8h.html" title="includes/add.h" alt="" coords="5,392,112,421"/><area shape="rect" id="node7" href="solution_8h.html" title="includes/solution.h" alt="" coords="424,237,555,267"/><area shape="rect" id="node18" href="remove_8h.html" title="includes/remove.h" alt="" coords="136,392,264,421"/><area shape="rect" id="node20" href="swap_8h.html" title="includes/swap.h" alt="" coords="643,392,757,421"/><area shape="rect" id="node27" href="operations_8h.html" title="includes/operations.h" alt="" coords="755,160,899,189"/><area shape="rect" id="node9" href="los_8h.html" title="includes/los.h" alt="" coords="237,315,339,344"/><area shape="rect" id="node12" href="stm_8h.html" title="includes/stm.h" alt="" coords="288,392,395,421"/><area shape="rect" id="node16" href="ltm_8h.html" title="rappresenta il livello LTM dell&#39;algoritmo UCARPP" alt="" coords="381,547,483,576"/><area shape="rect" id="node22" href="graphbmp-tools_8h.html" title="includes/graphbmp&#45;tools.h" alt="" coords="464,315,637,344"/><area shape="rect" id="node14" href="LTMConfiguration_8h.html" title="includes/LTMConfiguration.h" alt="" coords="208,469,395,499"/></map>
</div>
</div>
<p><a href="vehiclePath_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structVehiclePath.html">VehiclePath</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a14aeedd84bdd2acd01551fcaae8cbdfc">EDGE_NOT_FOUND</a>&#160;&#160;&#160;-2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a4ad620aee0cef5306fb2c43bf1439ee4">EDGE_REMOVED</a>&#160;&#160;&#160;-1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a66afaa222e9f7220cea1cb9320e5c9e1">NOT_PASSED</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a15a62c43d16e6ba1cf426c328a2e50b9">DIRECTION_NEXT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a96914b88bef25906285283404b762215">DIRECTION_PREV</a>&#160;&#160;&#160;0</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structVehiclePath.html">VehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#aeeef84de48fef30c32b0f727fff7133c">VehiclePath</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structVehiclePath.html">VehiclePath</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a95c3e86e73eed5d981cc015518d6dd9b">initVehiclePathCustomized</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> _prev, <a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> _edge, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> _next)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a1ec6212e25361176dcd62a2f58c420e1">initVehiclePath</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#ac966ce6e2e52a4143b73f33180669657">freeVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a0afbc980177c0c1bd7f8933b18fce3b9">freeVehiclePathHard</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a6201604769114c3a461e81d1e117970f">freeVehiclePathLight</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a9b67e16fbea9be9d944f34adb51ee3b8">cloneVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#afed2def948ad2051f40317e36661c200">cloneVehiclePathHard</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a2c08b83d4d4a50bffdbb0da89ea49601">addEdgeToVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> pvp)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#abc927d30b48959e9e14dfa4cf17440a1">addEdgeSolInVehiclePathCustomized</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> pvp, <a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> e)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#af1cac7fa7f6ad7e16deb287d8db18149">removeEdgeFromVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> pvp)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a0ac435b8a1d7572f0c4a52dee4bf33fb">deleteEdgeFromVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pid, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> pvp)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#af06d0c5ff351457be13a1dff1bab4814">resetMemory</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path, int direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#af9b0ff11a03068fa8e26b5327ad09436">getEdgeWalkedInVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> pe, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a9b645f7abbbaeeb2dadf6ebd6cf32ce7">getEdgeWalkedTimesInVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> p_edge, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a7f311c535e072b7640fb62bbc01262cc">getNodeSetTouchedInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path, int N, int *setLength)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a61f206a4875dd6e1d1e52885034475e5">isEdgeWalkedOnceInVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> p_edge, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a041877b21905cb7cd97239002ef60718">isEdgeWalkedInVehiclePath</a> (<a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a> p_edge, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a3099ca9329877c226b63c8c8bbf9e160">getNextEdgeInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> p_path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a15b2a23efd8cdf6a7cf29ac10f3e12db">getPrevEdgeInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a4600421770bbb6e14e2a4f854acaee9b">getNearEdgeInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path, int direction)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a7f3199c28502e2365da4491bd9ac1ab9">isNodeTouchedInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path, int v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#a0150055a43a57178d85bdde9fae92d7f">getEdgesNearNodeInVehiclePath</a> (<a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path, int node)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vehiclePath_8h.html#ad8edd6a092564360e2881657c00d5b5b">printVehiclePath</a> (FILE *f, <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> path)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a15a62c43d16e6ba1cf426c328a2e50b9"></a><!-- doxytag: member="vehiclePath.h::DIRECTION_NEXT" ref="a15a62c43d16e6ba1cf426c328a2e50b9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="vehiclePath_8h.html#a15a62c43d16e6ba1cf426c328a2e50b9">DIRECTION_NEXT</a>&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>macro da utilizzare in resetMemory e getXXXEdgeIDInVehiclePath </p>

</div>
</div>
<a class="anchor" id="a96914b88bef25906285283404b762215"></a><!-- doxytag: member="vehiclePath.h::DIRECTION_PREV" ref="a96914b88bef25906285283404b762215" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="vehiclePath_8h.html#a96914b88bef25906285283404b762215">DIRECTION_PREV</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>macro da utilizzare in resetMemory e getXXXEdgeIDInVehiclePath </p>

</div>
</div>
<a class="anchor" id="a14aeedd84bdd2acd01551fcaae8cbdfc"></a><!-- doxytag: member="vehiclePath.h::EDGE_NOT_FOUND" ref="a14aeedd84bdd2acd01551fcaae8cbdfc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="vehiclePath_8h.html#a14aeedd84bdd2acd01551fcaae8cbdfc">EDGE_NOT_FOUND</a>&#160;&#160;&#160;-2</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>il valore di ritorno della funzione <a class="el" href="vehiclePath_8h.html#af1cac7fa7f6ad7e16deb287d8db18149">removeEdgeFromVehiclePath()</a> nel caso in cui l'arco passato come parametro non e' stato trovato nel percorso </p>

</div>
</div>
<a class="anchor" id="a4ad620aee0cef5306fb2c43bf1439ee4"></a><!-- doxytag: member="vehiclePath.h::EDGE_REMOVED" ref="a4ad620aee0cef5306fb2c43bf1439ee4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="vehiclePath_8h.html#a4ad620aee0cef5306fb2c43bf1439ee4">EDGE_REMOVED</a>&#160;&#160;&#160;-1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>il valore di ritorno della funzione <a class="el" href="vehiclePath_8h.html#af1cac7fa7f6ad7e16deb287d8db18149">removeEdgeFromVehiclePath()</a> nel caso in cui l'arco passato come parametro e' stato rimosso dal percorso </p>

</div>
</div>
<a class="anchor" id="a66afaa222e9f7220cea1cb9320e5c9e1"></a><!-- doxytag: member="vehiclePath.h::NOT_PASSED" ref="a66afaa222e9f7220cea1cb9320e5c9e1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="vehiclePath_8h.html#a66afaa222e9f7220cea1cb9320e5c9e1">NOT_PASSED</a>&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>il valore di ritorno della funzione getEdgeWalkedTimesInVehiclePath in caso l'arco non sia stato percorso </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a7ea405f144cc006ea3fe96d97cb01ccd"></a><!-- doxytag: member="vehiclePath.h::PvehiclePath" ref="a7ea405f144cc006ea3fe96d97cb01ccd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structVehiclePath.html">VehiclePath</a>* <a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>indica una lista di VechiclePath: una variabile di questo tipo rappresenta il percorso di un singolo camion k </p>

</div>
</div>
<a class="anchor" id="aeeef84de48fef30c32b0f727fff7133c"></a><!-- doxytag: member="vehiclePath.h::VehiclePath" ref="aeeef84de48fef30c32b0f727fff7133c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structVehiclePath.html">VehiclePath</a>  <a class="el" href="structVehiclePath.html">VehiclePath</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rappresenta un percorso di un camion. Strutturalmente il percorso e' una lista circolare a doppio puntatore con sentinella. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="abc927d30b48959e9e14dfa4cf17440a1"></a><!-- doxytag: member="vehiclePath.h::addEdgeSolInVehiclePathCustomized" ref="abc927d30b48959e9e14dfa4cf17440a1" args="(PvehiclePath pvp, PedgeSol e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#abc927d30b48959e9e14dfa4cf17440a1">addEdgeSolInVehiclePathCustomized</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>pvp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>aggiunge l'edgeSol passato come parametro come nuovo arco percorso all'interno del cammino passato. <b>Non vengono effettuate copie dell'<a class="el" href="structEdgeSol.html">EdgeSol</a></b>; inoltree nessun controllo viene effettuato qualor al'arco sia gia' presente nella lista</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL </li>
<li>path inizializzato correttamente </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova istanza di una lista di archi contenuta in memoria puntante l'edgeSol passato</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pvp</td><td>il cammino in cui agigungere la nuova soluzione </td></tr>
    <tr><td class="paramname">e</td><td>l'edgeSol da aggiungere </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2c08b83d4d4a50bffdbb0da89ea49601"></a><!-- doxytag: member="vehiclePath.h::addEdgeToVehiclePath" ref="a2c08b83d4d4a50bffdbb0da89ea49601" args="(PedgeID pid, PvehiclePath pvp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehiclePath_8h.html#a2c08b83d4d4a50bffdbb0da89ea49601">addEdgeToVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>pvp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>aggiunge un nuovo arco percorso da un camion all'interno della lista passata come parametro. L'arco viene aggiunto in coda alla lista. In caso l'arco esista gia' all'interno del percorso, viene incrementato il campo x del relativo <a class="el" href="structEdgeID.html">EdgeID</a>.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL </li>
<li>edge ha i&lt;j </li>
<li>pvp non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>l'arco passato e' all'interno della lista</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>indica l'arco da aggiungere in lista </td></tr>
    <tr><td class="paramname">path</td><td>indica la lista che deve essere aggiornata </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se l'arco e' stato aggiunto fisicamente al percorso, FALSE se era gia' contenuto in esso </dd></dl>

</div>
</div>
<a class="anchor" id="a9b67e16fbea9be9d944f34adb51ee3b8"></a><!-- doxytag: member="vehiclePath.h::cloneVehiclePath" ref="a9b67e16fbea9be9d944f34adb51ee3b8" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> <a class="el" href="vehiclePath_8h.html#a9b67e16fbea9be9d944f34adb51ee3b8">cloneVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera una nuova istanza di <a class="el" href="structVehiclePath.html">VehiclePath</a> allocata in memoria uguale a quyella passata. Vengono copiate: </p>
<ul>
<li>la singola istanza di path;</li>
</ul>
<p>cio' significa che i successori e i predecessori di questo path <b>NON</b> vengono copiati. La tabella mostra quali attributi vengono copiati in quale modo: </p>
<table class="doxtable">
<tr>
<th>Campo </th><th>copia per...  </th></tr>
<tr>
<td>prev </td><td>indirizzo  </td></tr>
<tr>
<th>next </th><th>indirizzo  </th></tr>
<tr>
<th>edge </th><th>valore  </th></tr>
</table>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova istanza in memoria di path. Da deallocare manualmente</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il singolo path da copiare fisicamente </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un nuova istanza di <a class="el" href="structVehiclePath.html">VehiclePath</a> </dd></dl>

</div>
</div>
<a class="anchor" id="afed2def948ad2051f40317e36661c200"></a><!-- doxytag: member="vehiclePath.h::cloneVehiclePathHard" ref="afed2def948ad2051f40317e36661c200" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> <a class="el" href="vehiclePath_8h.html#afed2def948ad2051f40317e36661c200">cloneVehiclePathHard</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>genera una nuova istanza di <a class="el" href="structVehiclePath.html">VehiclePath</a> allocata in memoria uguale a quella passata. Vengono copiate: </p>
<ul>
<li>l'istanza puntata da path </li>
<li>tutte le istanza che si configurano come i successori a path; </li>
<li>tutte le edgeSol puntate da ogni singola istanza di <a class="el" href="structVehiclePath.html">VehiclePath</a>;</li>
</ul>
<p>La tabella mostra quali attributi vengono copiati in che modo: </p>
<table class="doxtable">
<tr>
<th>Campo </th><th>copia per...  </th></tr>
<tr>
</tr>
</table>
<p>prev </p>
<p>calcolata di nuovo  </p>
<p>next </p>
<p>calcolata di nuovo  </p>
<p>edge </p>
<p>fisicamente  </p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL</li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>una nuova lista di vehiclePath uguale in tutto per tutto all'originale</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il percorso da copiare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad una istanza di lista di <a class="el" href="structVehiclePath.html">VehiclePath</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a0ac435b8a1d7572f0c4a52dee4bf33fb"></a><!-- doxytag: member="vehiclePath.h::deleteEdgeFromVehiclePath" ref="a0ac435b8a1d7572f0c4a52dee4bf33fb" args="(PedgeID pid, PvehiclePath pvp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehiclePath_8h.html#a0ac435b8a1d7572f0c4a52dee4bf33fb">deleteEdgeFromVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>pvp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>cancella completamente l'arco specificato dal percorso del camion senza curarsi di quante volte il camion e' passato per l'arco.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL </li>
<li>pvp non NULL </li>
<li>edge ha i&lt;j</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>l'arco da rimuovere </td></tr>
    <tr><td class="paramname">path</td><td>il percorso da controllare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se è stato eliminato; FALSE se non esisteva. </dd></dl>

</div>
</div>
<a class="anchor" id="ac966ce6e2e52a4143b73f33180669657"></a><!-- doxytag: member="vehiclePath.h::freeVehiclePath" ref="ac966ce6e2e52a4143b73f33180669657" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#ac966ce6e2e52a4143b73f33180669657">freeVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>libera la memoria da una singola istanza di <a class="el" href="structVehiclePath.html">VehiclePath</a>: sia i suoi successori che i suoi predecessori <b>NON</b> verranno eliminati; neppure l'<a class="el" href="structEdgeSol.html">EdgeSol</a> puntato dalla struttura verra' disposto</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il <a class="el" href="structVehiclePath.html">VehiclePath</a> da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0afbc980177c0c1bd7f8933b18fce3b9"></a><!-- doxytag: member="vehiclePath.h::freeVehiclePathHard" ref="a0afbc980177c0c1bd7f8933b18fce3b9" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#a0afbc980177c0c1bd7f8933b18fce3b9">freeVehiclePathHard</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>libera la memoria dall'istanza path. Verranno eliminate: </p>
<ul>
<li>tutti gli elementi successivi a path (path incluso) </li>
<li>gli edgeSol puntati dai successori di path (path incluso)</li>
</ul>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL </li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il cammino da eliminare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6201604769114c3a461e81d1e117970f"></a><!-- doxytag: member="vehiclePath.h::freeVehiclePathLight" ref="a6201604769114c3a461e81d1e117970f" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#a6201604769114c3a461e81d1e117970f">freeVehiclePathLight</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>elimina dalla memoria la lista dei successori di path, <b>senza</b> tuttavia eliminare dalla memoria gli edgeSol ad essi collegati. Utile se la lista da eliminare e' un surrogato di un cammino principale </p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il cammino da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0150055a43a57178d85bdde9fae92d7f"></a><!-- doxytag: member="vehiclePath.h::getEdgesNearNodeInVehiclePath" ref="a0150055a43a57178d85bdde9fae92d7f" args="(PvehiclePath path, int node)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> <a class="el" href="vehiclePath_8h.html#a0150055a43a57178d85bdde9fae92d7f">getEdgesNearNodeInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>determina gli archi che sono adiacenti al nodo passato all'interno del percorso. Per esempio la funzione applicata al percorso (1;2)(2;3)(3;4)(4;5)(5:3)(3;6)(6;1) con nodo 3 ritornera' il set di archi (2;3)(3;4)(3;5)</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>path non NULL </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>un'istanza di vehiclePath contenente tutti gli archi toccanti il dato nodo. <b>RIcordarsi</b> di disporre di questa istanza!</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il percorso da valutare </td></tr>
    <tr><td class="paramname">node</td><td>il nodo in comune a tutti gli archi </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>una lista di archi che toccano il nodo passato </dd></dl>

</div>
</div>
<a class="anchor" id="af9b0ff11a03068fa8e26b5327ad09436"></a><!-- doxytag: member="vehiclePath.h::getEdgeWalkedInVehiclePath" ref="af9b0ff11a03068fa8e26b5327ad09436" args="(PedgeID pe, PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> <a class="el" href="vehiclePath_8h.html#af9b0ff11a03068fa8e26b5327ad09436">getEdgeWalkedInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>verifica se il percorso effettuato dal particolare camion transita o meno dal particolare arco.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>l'edge da trovare </td></tr>
    <tr><td class="paramname">path</td><td>il percorso da analizzare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>la struttura di tipo <a class="el" href="structVehiclePath.html">VehiclePath</a> (quindi comprende anche successori e predecessori) che contiene l'arco trovato. NULL se l'arco non viene percorso. </dd></dl>

</div>
</div>
<a class="anchor" id="a9b645f7abbbaeeb2dadf6ebd6cf32ce7"></a><!-- doxytag: member="vehiclePath.h::getEdgeWalkedTimesInVehiclePath" ref="a9b645f7abbbaeeb2dadf6ebd6cf32ce7" args="(PedgeID p_edge, PvehiclePath p_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="vehiclePath_8h.html#a9b645f7abbbaeeb2dadf6ebd6cf32ce7">getEdgeWalkedTimesInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>p_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>restituisce il numero di percorrenze del particolare arco nel particolare percorso.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>l'edge da trovare </td></tr>
    <tr><td class="paramname">path</td><td>il percorso da analizzare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>il valore x dell'arco nel percorso. NULL se l'arco non viene percorso. </dd></dl>

</div>
</div>
<a class="anchor" id="a4600421770bbb6e14e2a4f854acaee9b"></a><!-- doxytag: member="vehiclePath.h::getNearEdgeInVehiclePath" ref="a4600421770bbb6e14e2a4f854acaee9b" args="(PvehiclePath path, int direction)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> <a class="el" href="vehiclePath_8h.html#a4600421770bbb6e14e2a4f854acaee9b">getNearEdgeInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>direction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>ad ogni richiamo della funzione viene tornato un arco all'interno del percorso passato come parametro. Quando il percorso e' terminato la funzione ritorna NULL. Prima di utilizzare questa funzione assicurarsi di richiamare sempre la funzione resetMemory: il mancato richiamo portera' a comportamenti imprevedibili. Una volta che il percorso e' terminato <b>utilizzare la funzione resetMemory</b> prima di riutilizzare questa funzione.<br/>
 UTILIZZO<br/>
 <em> resetMemory(percorso_camion_1);<br/>
 while ((edge=getNextEdgeInVehiclePath(percorso_camion_1))!=NULL){<br/>
 //PUT YOUR CODE HERE...<br/>
 }<br/>
 </em></p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il path che si sta percorrendo </td></tr>
    <tr><td class="paramname">direction</td><td>la direzione da scliegere per ottenere il prossimo arco del percorso. puo' assumere due valori diversi: <ul>
<li>DIRECTION_NEXT per scegliere l'arco posteriore a quello corrente </li>
<li>DIRECTION_PREV per scegliere l'arco precedente a quello corrente </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>l'arco precedente all'ultimo arco ritornato da questa funzione nel percorso, NULL se siamo arrivati alla fine del percorso </dd></dl>

</div>
</div>
<a class="anchor" id="a3099ca9329877c226b63c8c8bbf9e160"></a><!-- doxytag: member="vehiclePath.h::getNextEdgeInVehiclePath" ref="a3099ca9329877c226b63c8c8bbf9e160" args="(PvehiclePath p_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> <a class="el" href="vehiclePath_8h.html#a3099ca9329877c226b63c8c8bbf9e160">getNextEdgeInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>ad ogni richiamo della funzione viene tornato un arco all'interno del percorso passato come parametro. Quando il percorso e' terminato la funzione ritorna NULL. Prima di utilizzare questa funzione assicurarsi di richiamare sempre la funzione resetMemory: il mancato richiamo portera' a comportamenti imprevedibili. Una volta che il percorso e' terminato <b>utilizzare la funzione resetMemory</b> prima di riutilizzare questa funzione.<br/>
 UTILIZZO<br/>
 <em> resetMemory(percorso_camion_1);<br/>
 while (edge=getNextEdgeInVehiclePath(percorso_camion_1)){<br/>
 //PUT YOUR CODE HERE...<br/>
 }<br/>
 </em></p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il path che si sta percorrendo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>il prossimo arco nel percorso, NULL se siamo arrivati alla fine del percorso </dd></dl>

</div>
</div>
<a class="anchor" id="a7f311c535e072b7640fb62bbc01262cc"></a><!-- doxytag: member="vehiclePath.h::getNodeSetTouchedInVehiclePath" ref="a7f311c535e072b7640fb62bbc01262cc" args="(PvehiclePath p_path, int N, int *setLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int* <a class="el" href="vehiclePath_8h.html#a7f311c535e072b7640fb62bbc01262cc">getNodeSetTouchedInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>setLength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">p_path</td><td>il percorso in esame </td></tr>
    <tr><td class="paramname">N</td><td>cardinalità del grafo. Permette una computazione molto rapida della procedura </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un array di *setLength identificativi dei nodi toccati dal path. </dd></dl>

</div>
</div>
<a class="anchor" id="a15b2a23efd8cdf6a7cf29ac10f3e12db"></a><!-- doxytag: member="vehiclePath.h::getPrevEdgeInVehiclePath" ref="a15b2a23efd8cdf6a7cf29ac10f3e12db" args="(PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a> <a class="el" href="vehiclePath_8h.html#a15b2a23efd8cdf6a7cf29ac10f3e12db">getPrevEdgeInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>ad ogni richiamo della funzione viene tornato un arco all'interno del percorso passato come parametro. Quando il percorso e' terminato la funzione ritorna NULL. Prima di utilizzare questa funzione assicurarsi di richiamare sempre la funzione resetMemory: il mancato richiamo portera' a comportamenti imprevedibili. Una volta che il percorso e' terminato <b>utilizzare la funzione resetMemory</b> prima di riutilizzare questa funzione.<br/>
 UTILIZZO<br/>
 <em> resetMemory(percorso_camion_1);<br/>
 while ((edge=getNextEdgeInVehiclePath(percorso_camion_1))!=NULL){<br/>
 //PUT YOUR CODE HERE...<br/>
 }<br/>
 </em></p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il path che si sta percorrendo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>l'arco precedente all'ultimo arco ritornato da questa funzione nel percorso, NULL se siamo arrivati alla fine del percorso </dd></dl>

</div>
</div>
<a class="anchor" id="a1ec6212e25361176dcd62a2f58c420e1"></a><!-- doxytag: member="vehiclePath.h::initVehiclePath" ref="a1ec6212e25361176dcd62a2f58c420e1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> <a class="el" href="vehiclePath_8h.html#a1ec6212e25361176dcd62a2f58c420e1">initVehiclePath</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costurisce un nuovo percorso di un camion perfettamente vuoto. In realta', essendo questo struttura fondamentalmente una lista circolare a doppio puntatore con sentinella, la lista ha un'unico oggetto che e' appunto la sentinella stessa. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad una lista di <a class="el" href="structVehiclePath.html">VehiclePath</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a95c3e86e73eed5d981cc015518d6dd9b"></a><!-- doxytag: member="vehiclePath.h::initVehiclePathCustomized" ref="a95c3e86e73eed5d981cc015518d6dd9b" args="(PvehiclePath _prev, PedgeSol _edge, PvehiclePath _next)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a> <a class="el" href="vehiclePath_8h.html#a95c3e86e73eed5d981cc015518d6dd9b">initVehiclePathCustomized</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>_prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="edgeSol_8h.html#af980339782143196b3c33e6bdce13c92">PedgeSol</a>&#160;</td>
          <td class="paramname"><em>_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>_next</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>funzione di <b>UTILITY: NON UTILIZZARE!!!</b><br/>
 istanzia un vehicle path inserendo i dati nella lista a doppio puntatore in modo grezzo</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">_prev</td><td>l'elemento <a class="el" href="structVehiclePath.html">VehiclePath</a> precedente a questo </td></tr>
    <tr><td class="paramname">_edge</td><td>l'edge su cui transita il camion </td></tr>
    <tr><td class="paramname">_next</td><td>l'elemento <a class="el" href="structVehiclePath.html">VehiclePath</a> successivo a questo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad una istanza PvehiclePath </dd></dl>

</div>
</div>
<a class="anchor" id="a041877b21905cb7cd97239002ef60718"></a><!-- doxytag: member="vehiclePath.h::isEdgeWalkedInVehiclePath" ref="a041877b21905cb7cd97239002ef60718" args="(PedgeID p_edge, PvehiclePath p_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehiclePath_8h.html#a041877b21905cb7cd97239002ef60718">isEdgeWalkedInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>p_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>la funzione calcola se l'arco passato e' presente o meno nel cammino. La funzione non altera in alcun modo la memoria quindi e' perfettamente compatibile con le funzioni: </p>
<ul>
<li>getPrevEdgeInVehiclePath; </li>
<li>getNextEdgeInVehiclePath; </li>
<li>getNearEdgeInVehiclePath. Non e' dunque necessario richiamare resetMemory prima o dopo averla utilizzata.</li>
</ul>
<p>Nella pratica wrappa la funzione getEdgeWalkedInVehiclePath.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il percorso da analizzare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE se l'arco e' compreso nel percorso, FALSE altrimenti </dd></dl>

</div>
</div>
<a class="anchor" id="a61f206a4875dd6e1d1e52885034475e5"></a><!-- doxytag: member="vehiclePath.h::isEdgeWalkedOnceInVehiclePath" ref="a61f206a4875dd6e1d1e52885034475e5" args="(PedgeID p_edge, PvehiclePath p_path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehiclePath_8h.html#a61f206a4875dd6e1d1e52885034475e5">isEdgeWalkedOnceInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>p_edge</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>p_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>vero sse l'arco è percorso una e una sola volta nel path. </dd></dl>

</div>
</div>
<a class="anchor" id="a7f3199c28502e2365da4491bd9ac1ab9"></a><!-- doxytag: member="vehiclePath.h::isNodeTouchedInVehiclePath" ref="a7f3199c28502e2365da4491bd9ac1ab9" args="(PvehiclePath path, int v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="vehiclePath_8h.html#a7f3199c28502e2365da4491bd9ac1ab9">isNodeTouchedInVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>il percorso in analisi </td></tr>
    <tr><td class="paramname">v</td><td>l'indice del nodo sotto esame </td></tr>
    <tr><td class="paramname">N</td><td>la cardinalità del grafo </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE sse il nodo v è contenuto nel percorso path </dd></dl>

</div>
</div>
<a class="anchor" id="ad8edd6a092564360e2881657c00d5b5b"></a><!-- doxytag: member="vehiclePath.h::printVehiclePath" ref="ad8edd6a092564360e2881657c00d5b5b" args="(FILE *f, PvehiclePath path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#ad8edd6a092564360e2881657c00d5b5b">printVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>stampa il percorso effettuato</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>file su cui scrivere il percorso </td></tr>
    <tr><td class="paramname">path</td><td>percorso da stampare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af1cac7fa7f6ad7e16deb287d8db18149"></a><!-- doxytag: member="vehiclePath.h::removeEdgeFromVehiclePath" ref="af1cac7fa7f6ad7e16deb287d8db18149" args="(PedgeID pid, PvehiclePath pvp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="vehiclePath_8h.html#af1cac7fa7f6ad7e16deb287d8db18149">removeEdgeFromVehiclePath</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="edgeID_8h.html#a73a3d93dc3a3c49a3e5ec5ec758e309f">PedgeID</a>&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>pvp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rimuove UNA percorrenza dell'arco specificato dal percorso del camion. Esistono varie casistiche: </p>
<ul>
<li>l'arco viene transitato dal camion piu' di 1 volta: in questo caso viene decrementato il campo x dell'<a class="el" href="structEdgeSol.html">EdgeSol</a> </li>
<li>l'arco viene transitato dal camion una sola volta: in questo caso l'arco viene rimosso dal percorso </li>
<li>l'arco non viene mai trasitato dal camion: la funzione non effettua alcuna operazione.</li>
</ul>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>edge non NULL </li>
<li>pvp non NULL </li>
<li>edge ha i&lt;j</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">edge</td><td>l'arco da rimuovere </td></tr>
    <tr><td class="paramname">path</td><td>il percorso da controllare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>esistono diversi casi: <ul>
<li>EDGE_REMOVED se l'arco e' stato rimosso dal percorso </li>
<li>EDGE_NOT_FOUND se l'arco edge non era incluso nel percorso </li>
<li>il numero di volte (strettamente positive) che l'arco edge viene percorso dopo aver eseguito questa funzione </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="af06d0c5ff351457be13a1dff1bab4814"></a><!-- doxytag: member="vehiclePath.h::resetMemory" ref="af06d0c5ff351457be13a1dff1bab4814" args="(PvehiclePath path, int direction)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="vehiclePath_8h.html#af06d0c5ff351457be13a1dff1bab4814">resetMemory</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vehiclePath_8h.html#a7ea405f144cc006ea3fe96d97cb01ccd">PvehiclePath</a>&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>direction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>sincronizza la memoria interna con il percorso passato come parametro. E' <b>necessario</b> chiamare questa funzione prima della prima chiamata di una delle funzioni: </p>
<ul>
<li><a class="el" href="vehiclePath_8h.html#a15b2a23efd8cdf6a7cf29ac10f3e12db">getPrevEdgeInVehiclePath()</a>; </li>
<li><a class="el" href="vehiclePath_8h.html#a3099ca9329877c226b63c8c8bbf9e160">getNextEdgeInVehiclePath()</a>; </li>
<li><a class="el" href="vehiclePath_8h.html#a4600421770bbb6e14e2a4f854acaee9b">getNearEdgeInVehiclePath()</a>; o comunque dopo aver terminato di usare le funzioni precedentemente elencato in un ciclo.<br/>
 Supponiamo infatti di aver appena concluso di analizzare un percorso; se vogliamo analizzare un secondo percorso (eventualmente diverso dal primo) basta richiamare questa funzione usando l'invocazione:<br/>
 <em> while ((edge=getNextEdgeInVehiclePath(percorso_camion_1))!=NULL){<br/>
 //CODE }<br/>
 resetMemory(percorso_camion_2);<br/>
 while ((edge=getNextEdgeInVehiclePath(percorso_camion_2))!=NULL){<br/>
 //OTHER CODE }<br/>
 </em> questa funzione non puo' essere richiamata all'interno di un ciclo che e' gia' governato da anche una sola delle funzione sopra elencate</li>
</ul>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>indica il percorso da settare </td></tr>
    <tr><td class="paramname">direction</td><td>indica la direzione da cui partire: puo' valere DIRECTION_NEXT o DIRECTION_PREV </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="vehiclePath_8h.html">vehiclePath.h</a>      </li>

    <li class="footer">Generated on Wed Sep 4 2013 06:38:57 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
